import { http } from '@/utils/http';
import type { ISelectItem } from '@/types/popup';

export const getProviceApi = () => {
  return http<ISelectItem[]>({
    url: '/mock/provice',
    method: 'get',
  });
};

export interface ICityQuery {
  pid: number | string;
}
export const getCityApi = (data: ICityQuery) => {
  return http<ISelectItem[]>({
    url: '/mock/city',
    method: 'get',
    data,
  });
};

export interface IRegionQuery {
  pid: number | string;
  cid: number | string;
}
export const getRegionApi = (data: IRegionQuery) => {
  return http<ISelectItem[]>({
    url: '/mock/region',
    method: 'get',
    data,
  });
};
